
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main() {
    vector<string> word = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };
    vector<string> Q;
    string input;
    getline(cin, input);

    string temp = "";
    for (char c : input) {
        if (c != ' ') {
            temp += c;
        }
        else {
            Q.push_back(temp);
            temp = "";
        }
    }
    Q.push_back(temp);

    int s = 0;
    if (Q.size() == 3) {
        for (int i = 0; i < 3; i++) {
            cout << "right" << endl;
        }
    }
    else {
        for (int i = 0; i < 3; i++) {
            if (find(word.begin(), word.end(), Q[i]) == word.end()) {
                cout << "wrong input" << endl;
            }
        }
    }

    for (int i = 0; i < 10; i++) {
        if (Q[0] == word[i]) {
            s = i * 100;
        }
        if (Q[1] == word[i]) {
            s += i * 10;
        }
        if (Q[2] == word[i]) {
            s += i * 1;
        }
    }

    cout << s << endl;

    return 0;
}
